home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_tkcvs.idb / usr / freeware / lib / tkcvs / logcanvas.tcl.z / logcanvas.tcl
Encoding:
Text File  |  1999-04-16  |  17.6 KB  |  567 lines

  1. #
  2. # TCL Library for tkCVS
  3. #
  4.  
  5. #
  6. # $Id: logcanvas.tcl,v 1.13 1995/11/13 05:16:55 davide Exp $
  7. # Contains procedures used for the log canvas for tkCVS.
  8. #
  9.  
  10. #
  11. # Globals used in drawing canvases
  12. #
  13.  
  14. # Height and width to draw boxes
  15. set cvscanv(boxx) 60
  16. set cvscanv(boxy) 30
  17. # Gaps between boxes
  18. set cvscanv(gapx) [expr $cvscanv(boxx) + 10]
  19. set cvscanv(gapy) [expr $cvscanv(boxy) + 10]
  20. # Indent at top left of canvas
  21. set cvscanv(indx) 20
  22. set cvscanv(indy) 20
  23. # Static type variables used while drawing on the canvas.
  24. set cvscanv(nextx) $cvscanv(indx)
  25. set cvscanv(nexty) $cvscanv(indy)
  26. set cvscanv(indents) 0
  27. set cvscanv(xhigh) [expr $cvscanv(boxx) + $cvscanv(indx)]
  28. set cvscanv(yhigh) [expr $cvscanv(boxy) + $cvscanv(indy)]
  29. set cvscanv(xlow) 0
  30. set cvscanv(ylow) 0
  31.  
  32. proc new_logcanvas {localfile filelog} {
  33. #
  34. # Creates a new log canvas.  filelog must be the output of a cvs
  35. # log or rlog command.  If localfile is not "no file" then it is
  36. # the file name in the local directory that this applies to.
  37. #
  38.   global cvs
  39.   global cvscanv
  40.   global tagvalues
  41.  
  42.   static {canvasnum 0}
  43.  
  44.   # Make the canvas
  45.  
  46.   incr canvasnum
  47.   set logcanvas ".logcanvas$canvasnum"
  48.   toplevel $logcanvas
  49.  
  50.   frame $logcanvas.up -relief groove -border 2
  51.   frame $logcanvas.up.left
  52.   frame $logcanvas.up.right
  53.   frame $logcanvas.up1 -relief groove -border 2
  54.   frame $logcanvas.up1.left
  55.   frame $logcanvas.up1.right
  56.   frame $logcanvas.up2 -relief groove -border 2
  57.   frame $logcanvas.up2.left
  58.   frame $logcanvas.up2.right
  59.   frame $logcanvas.down -relief groove -border 2
  60.  
  61.   pack $logcanvas.up -side top -fill x
  62.   pack $logcanvas.up.left -side left -fill both
  63.   pack $logcanvas.up.right -side left -fill both -expand 1
  64.   pack $logcanvas.up1 -side top -fill x
  65.   pack $logcanvas.up1.left -side left -fill both
  66.   pack $logcanvas.up1.right -side left -fill both -expand 1
  67.   pack $logcanvas.up2 -side top -fill x
  68.   pack $logcanvas.up2.left -side left -fill both
  69.   pack $logcanvas.up2.right -side left -fill both -expand 1
  70.   pack $logcanvas.down -side bottom -fill x
  71.  
  72.   label $logcanvas.lfname -anchor w -text "RCS File Name"
  73.   entry $logcanvas.tfname
  74.   # This is a hidden entry that stores the local file name.
  75.   entry $logcanvas.tlocalfile
  76.   $logcanvas.tlocalfile delete 0 end
  77.   $logcanvas.tlocalfile insert end $localfile
  78.  
  79.   label $logcanvas.lvers1 -anchor w -text "Version A"
  80.   label $logcanvas.lwho1 -anchor w -text "Created by"
  81.   label $logcanvas.ldate1 -anchor w -text "Date"
  82.   label $logcanvas.lcomment1 -anchor w -text "Comment"
  83.  
  84.   entry $logcanvas.tvers1 -relief sunken
  85.   label $logcanvas.twho1 -anchor w -text "--"
  86.   label $logcanvas.tdate1 -anchor w -text "--"
  87.   text  $logcanvas.tcomment1 -height 5 -width 75
  88.  
  89.   label $logcanvas.lvers2 -anchor w -text "Version B"
  90.   label $logcanvas.lwho2 -anchor w -text "Created by"
  91.   label $logcanvas.ldate2 -anchor w -text "Date"
  92.   label $logcanvas.lcomment2 -anchor w -text "Comment"
  93.  
  94.   entry $logcanvas.tvers2 -relief sunken
  95.   label $logcanvas.twho2 -anchor w -text "--"
  96.   label $logcanvas.tdate2 -anchor w -text "--"
  97.   text  $logcanvas.tcomment2 -height 5 -width 75
  98.  
  99.   pack $logcanvas.lfname \
  100.     -in $logcanvas.up.left \
  101.     -side top -fill x -pady 2
  102.   pack $logcanvas.tfname \
  103.     -in $logcanvas.up.right \
  104.     -side top -fill x -pady 0
  105.   pack $logcanvas.lvers1 $logcanvas.lwho1 $logcanvas.ldate1 $logcanvas.lcomment1 \
  106.     -in $logcanvas.up1.left \
  107.     -side top -fill x -pady 0
  108.   pack $logcanvas.tvers1 $logcanvas.twho1 $logcanvas.tdate1 $logcanvas.tcomment1 \
  109.     -in $logcanvas.up1.right \
  110.     -side top -fill x -pady 0
  111.   pack $logcanvas.lvers2 $logcanvas.lwho2 $logcanvas.ldate2 $logcanvas.lcomment2 \
  112.     -in $logcanvas.up2.left \
  113.     -side top -fill x -pady 0
  114.   pack $logcanvas.tvers2 $logcanvas.twho2 $logcanvas.tdate2 $logcanvas.tcomment2 \
  115.     -in $logcanvas.up2.right \
  116.     -side top -fill x -pady 0
  117.  
  118.   canvas $logcanvas.canvas -relief sunken -border 2 \
  119.     -yscrollcommand "$logcanvas.yscroll set" \
  120.     -xscrollcommand "$logcanvas.xscroll set"
  121.   scrollbar $logcanvas.xscroll -relief sunken -orient horizontal \
  122.     -command "$logcanvas.canvas xview"
  123.   scrollbar $logcanvas.yscroll -relief sunken \
  124.     -command "$logcanvas.canvas yview"
  125.  
  126.   #
  127.   # Create buttons
  128.   #
  129.  
  130.   button $logcanvas.help -text "Help" \
  131.     -command log_browser
  132.   button $logcanvas.view -text "View" \
  133.     -command "logcanvas_view $logcanvas"
  134.   button $logcanvas.diff -text "Diff" \
  135.     -command "logcanvas_diff $logcanvas"
  136.   pack $logcanvas.help $logcanvas.view $logcanvas.diff \
  137.     -in $logcanvas.down -side left \
  138.     -ipadx 2 -ipady 2 -padx 4 -pady 4 -fill both -expand 1
  139.   if {$localfile != "no file"} {
  140.     button $logcanvas.join -text "Merge Branch to Head" \
  141.       -command "logcanvas_join $localfile $logcanvas"
  142.     button $logcanvas.delta -text "Merge Changes to Head" \
  143.       -command "logcanvas_delta $localfile $logcanvas"
  144.     pack $logcanvas.join $logcanvas.delta \
  145.       -in $logcanvas.down -side left \
  146.       -ipadx 2 -ipady 2 -padx 4 -pady 4 -fill both -expand 1
  147.   }
  148.   button $logcanvas.viewtags -text "View Tags" \
  149.     -command "nop"
  150.   button $logcanvas.quit -text "Quit" \
  151.     -command "destroy $logcanvas"
  152.   pack $logcanvas.viewtags $logcanvas.quit \
  153.     -in $logcanvas.down -side left \
  154.     -ipadx 2 -ipady 2 -padx 4 -pady 4 -fill both -expand 1
  155.  
  156.   #
  157.   # Put the canvas on to the display.
  158.   #
  159.  
  160.   pack $logcanvas.xscroll -side bottom -fill x -padx 2 -pady 2
  161.   pack $logcanvas.yscroll -side right -fill y -padx 2 -pady 2
  162.   pack $logcanvas.canvas -fill both -expand 1
  163.  
  164.   logcanvas_clear $logcanvas
  165.  
  166.   #
  167.   # Window manager stuff.
  168.   #
  169.  
  170.   wm title $logcanvas "CVS Log Browser"
  171.   wm minsize $logcanvas 1 1
  172.  
  173.   # Draw the log onto the canvas.
  174.   # Start by splitting the log up and parsing it using a simple
  175.   # state machine.
  176.  
  177.   set loglist [split $filelog "\n"]
  178.   set logstate "searching"
  179.   set logstate "rcsfile"
  180.   foreach logline $loglist {
  181.     switch -exact -- $logstate {
  182.       "rcsfile" {
  183.         # Look for the first text line which should give the file name.
  184.         set fileline [split $logline]
  185.         if {[lindex $fileline 0] == "RCS"} {
  186.           $logcanvas.tfname delete 0 end
  187.           $logcanvas.tfname insert end [lindex $fileline 2]
  188.           set logstate "tags"
  189.           set taglist ""
  190.           if [array exists tagvalues] {
  191.             foreach item [array names tagvalues] {
  192.               set tagvalues($item) ""
  193.             }
  194.           }
  195.           continue
  196.         }
  197.       }
  198.       "tags" {
  199.         # Any line with a tab leader is a tag
  200.         if { [string index $logline 0] == "\t" } {
  201.           set taglist "$taglist$logline\n"
  202.           set tagitems [split $logline ":"]
  203.           set tagname [string trim [lindex $tagitems 0]]
  204.           set tagrevision [string trim [lindex $tagitems 1]]
  205.           set tagvalues($tagname) $tagrevision
  206.           #puts "Tag $tagname is on revision $tagrevision"
  207.         } else {
  208.           if {$logline == "description:"} {
  209.             # No more tags after this point
  210.             $logcanvas.viewtags configure \
  211.               -command "view_output Tags \"$taglist\""
  212.             set logstate "searching"
  213.             continue
  214.           }
  215.           if {$logline == "----------------------------"} {
  216.             # Oops, missed something.
  217.             $logcanvas.viewtags configure \
  218.               -command "view_output Tags \"$taglist\""
  219.             set logstate "revision"
  220.             continue
  221.           }
  222.         }
  223.       }
  224.       "searching" {
  225.         # Look for the line that starts a revision message.
  226.         if {$logline == "----------------------------"} {
  227.           set logstate "revision"
  228.           continue
  229.         }
  230.       }
  231.       "revision" {
  232.         # Look for a revision number line
  233.         set revline [split $logline]
  234.         set revnum [lindex $revline 1]
  235.         set logstate "date"
  236.       }
  237.       "date" {
  238.         # Look for a date line.  This also has the name of the author.
  239.         set dateline [split $logline]
  240.         set revdate [lindex $dateline 1]
  241.         # set revtime [lindex $dateline 2]
  242.         # set revtime [string range $revtime 0 [expr [string length $revtime] - 2]]
  243.         set revwho  [lindex $dateline 5]
  244.         set revwho  [string range $revwho 0 [expr [string length $revwho] - 2]]
  245.         set logstate "logmessage"
  246.         set revcomment ""
  247.       }
  248.       "logmessage" {
  249.         # Read the log message which follows the date line.
  250.         if {$logline == "----------------------------"} {
  251.           set logstate "revision"
  252.           # Draw the revision box on the canvas.
  253.           # puts "Revision number $revnum by $revwho on $revdate at $revtime"
  254.           logcanvas_draw_box $logcanvas $revnum $revwho $revdate $revcomment
  255.           continue
  256.         } elseif {$logline == "============================================================================="} {
  257.           set logstate "terminated"
  258.           # Draw the revision box on the canvas.
  259.           # puts "Revision number $revnum by $revwho on $revdate at $revtime"
  260.           logcanvas_draw_box $logcanvas $revnum $revwho $revdate $revcomment
  261.           continue
  262.         }
  263.         # Process a revision log line
  264.         regsub -all "\"" $logline "'" newline
  265.         set revcomment "$revcomment$newline\n"
  266.       }
  267.       "terminated" {
  268.         # ignore any further lines
  269.         continue
  270.       }
  271.     }
  272.   }
  273.  
  274.   # End of log file processing.
  275. }
  276.  
  277. proc logcanvas_clear {logcanvas} {
  278. #
  279. # Clears the canvas and resets globals ready to re-draw.
  280. #
  281.   global cvscanv
  282.  
  283.   set cvscanv(nextx) $cvscanv(indx)
  284.   set cvscanv(nexty) $cvscanv(indy)
  285.   set cvscanv(indents) 0
  286.   set cvscanv(branches) {}
  287.   set cvscanv(xhigh) [expr $cvscanv(boxx) + $cvscanv(indx)]
  288.   set cvscanv(yhigh) [expr $cvscanv(boxy) + $cvscanv(indy)]
  289.   # $logcanvas.canvas delete all
  290. }
  291.  
  292. proc logcanvas_box_colour {revnum} {
  293. #
  294. # Determines what colour the box should be.
  295. #
  296.   global cvscfg
  297.   global tagvalues
  298.  
  299.   set return_colour black
  300.  
  301.   if [array exists tagvalues] {
  302.     foreach item [array names tagvalues] {
  303.       if [string match $tagvalues($item) $revnum] {
  304.         if [info exists cvscfg(boxcolour,$item)] {
  305.           set return_colour $cvscfg(boxcolour,$item)
  306.         }
  307.       }
  308.     }
  309.   }
  310.   #puts "colour of $revnum is $return_colour"
  311.   return $return_colour
  312. }
  313.  
  314. proc logcanvas_dot_colour {revnum} {
  315. #
  316. # Determines what colour dots in the box should be.
  317. #
  318.   global cvscfg
  319.   global tagvalues
  320.  
  321.   set return_colour {}
  322.  
  323.   if [array exists tagvalues] {
  324.     foreach item [array names tagvalues] {
  325.       if [string match $tagvalues($item) $revnum] {
  326.         if [info exists cvscfg(dotcolour,$item)] {
  327.           lappend return_colour $cvscfg(dotcolour,$item)
  328.           #puts "Found a dot coloured $cvscfg(dotcolour,$item) on tag $item for revision $revnum"
  329.         }
  330.       }
  331.     }
  332.   }
  333.   return $return_colour
  334. }
  335.  
  336. proc logcanvas_draw_box {logcanvas revnum revwho revdate revcomment} {
  337. #
  338. # Draws a box containing a revision of a file.
  339. #
  340.   global cvscanv
  341.  
  342.   set versions [split $revnum "."]
  343.   set numvers [llength $versions]
  344.  
  345.   switch -exact -- $numvers {
  346.     2 {
  347.       # Remember where the new box is going.
  348.       set cvscanv(posx$revnum) $cvscanv(nextx)
  349.       set cvscanv(posy$revnum) $cvscanv(nexty)
  350.       # draw a box
  351.       logcanvas_rectangle $logcanvas $revnum $revwho $revdate $revcomment \
  352.         $cvscanv(nextx) $cvscanv(nexty)
  353.       # Position the next box.
  354.       set cvscanv(nextx) $cvscanv(indx)
  355.       set cvscanv(nexty) [expr $cvscanv(nexty) + $cvscanv(gapy)]
  356.     }
  357.     4 {
  358.       # Have we seen this branch before?
  359.       set branchid [join [lrange $versions 0 2] "."]
  360.       if {[lsearch -exact $cvscanv(branches) $branchid] == -1} {
  361.         # No
  362.         lappend cvscanv(branches) $branchid
  363.         incr cvscanv(indents)
  364.       }
  365.       # x.y.z.u  -- version x.y must already exist, so find out where it is.
  366.       set backrevnum [join [lrange $versions 0 1] "."]
  367.       set thisx [expr $cvscanv(gapx) * $cvscanv(indents) + \
  368.         $cvscanv(indx) ]
  369.       set thisy [expr $cvscanv(posy$backrevnum) - \
  370.         $cvscanv(gapy) * [lindex $versions 3]]
  371.       # Remember where the new box is going.
  372.       set cvscanv(posx$revnum) $thisx
  373.       set cvscanv(posy$revnum) $thisy
  374.       # Draw the box
  375.       logcanvas_rectangle $logcanvas $revnum $revwho $revdate $revcomment \
  376.         $thisx $thisy
  377.       # Draw a connecting line.
  378.       if {[lindex $versions [expr $numvers - 1]] == "1"} {
  379.         $logcanvas.canvas create line \
  380.           [expr $cvscanv(boxx) / 2 + $thisx] \
  381.           [expr $cvscanv(boxy) + $thisy] \
  382.           [expr $cvscanv(boxx) + $cvscanv(posx$backrevnum)] \
  383.           [expr $cvscanv(boxy) / 2 + $cvscanv(posy$backrevnum)]
  384.       }
  385.     }
  386.     # Yes I know this is ugly -- just a cut and paste of the previous
  387.     # section -- fix this soon.
  388.     6 {
  389.       # Have we seen this branch before?
  390.       set branchid [join [lrange $versions 0 4] "."]
  391.       if {[lsearch -exact $cvscanv(branches) $branchid] == -1} {
  392.         # No
  393.         lappend cvscanv(branches) $branchid
  394.         incr cvscanv(indents)
  395.       }
  396.       # x.y.z.u  -- version x.y must already exist, so find out where it is.
  397.       set backrevnum [join [lrange $versions 0 3] "."]
  398.       set thisx [expr $cvscanv(gapx) * $cvscanv(indents) + \
  399.         $cvscanv(indx) ]
  400.       set thisy [expr $cvscanv(posy$backrevnum) - \
  401.         $cvscanv(gapy) * [lindex $versions 5]]
  402.       # Remember where the new box is going.
  403.       set cvscanv(posx$revnum) $thisx
  404.       set cvscanv(posy$revnum) $thisy
  405.       # Draw the box
  406.       logcanvas_rectangle $logcanvas $revnum $revwho $revdate $revcomment \
  407.         $thisx $thisy
  408.       # Draw a connecting line.
  409.       if {[lindex $versions [expr $numvers - 1]] == "1"} {
  410.         $logcanvas.canvas create line \
  411.           [expr $cvscanv(boxx) / 2 + $thisx] \
  412.           [expr $cvscanv(boxy) + $thisy] \
  413.           [expr $cvscanv(boxx) + $cvscanv(posx$backrevnum)] \
  414.           [expr $cvscanv(boxy) / 2 + $cvscanv(posy$backrevnum)]
  415.       }
  416.     }
  417.   }
  418.  
  419. }
  420.  
  421. proc logcanvas_rectangle {logcanvas revnum revwho revdate revcomment x y} {
  422. #
  423. # Breaks out some of the code from the logcanvas_draw_box procedure.
  424. #
  425.   global cvscanv
  426.  
  427.   set versions [split $revnum "."]
  428.   set numvers [llength $versions]
  429.  
  430.   # draw a box
  431.   $logcanvas.canvas create rectangle \
  432.     $x $y [expr $x + $cvscanv(boxx)] [expr $y + $cvscanv(boxy)] \
  433.     -width 3 \
  434.     -outline [logcanvas_box_colour $revnum] \
  435.     -tags v$revnum
  436.  
  437.   # Make sure the scrolling region is big enough
  438.   if {$cvscanv(xlow) > $x} {
  439.     set cvscanv(xlow) $x
  440.   }
  441.   if {$cvscanv(ylow) > $y} {
  442.     set cvscanv(ylow) $y
  443.   }
  444.   if {$cvscanv(xhigh) < [expr $x + $cvscanv(boxx)]} {
  445.     set cvscanv(xhigh) [expr $x + $cvscanv(boxx) + 10]
  446.   }
  447.   if {$cvscanv(yhigh) < [expr $y + $cvscanv(boxy)]} {
  448.     set cvscanv(yhigh) [expr $y + $cvscanv(boxy) + 10]
  449.   }
  450.   $logcanvas.canvas configure \
  451.     -scrollregion "$cvscanv(xlow) $cvscanv(ylow) $cvscanv(xhigh) $cvscanv(yhigh)"
  452.  
  453.   # Put the version number in the box
  454.   $logcanvas.canvas create text \
  455.     [expr $x + 4] [expr $y + 2] \
  456.     -anchor nw -text $revnum  \
  457.     -fill [logcanvas_box_colour $revnum] \
  458.     -tags v$revnum
  459.   $logcanvas.canvas create text \
  460.     [expr $x + 4] [expr $y + 14] \
  461.     -anchor nw -text $revwho \
  462.     -fill [logcanvas_box_colour $revnum] \
  463.     -tags v$revnum
  464.  
  465.   # Put some dots in the box if necessary.
  466.   set dotnum 0
  467.   foreach dotcolour [logcanvas_dot_colour $revnum] {
  468.     set dotx [expr $x + $cvscanv(boxx) - 8]
  469.     set doty [expr $dotnum * 6 + $y + 3]
  470.     #puts "Drawing a dot at $dotx $doty coloured $dotcolour"
  471.     $logcanvas.canvas create oval \
  472.       $dotx $doty [expr $dotx + 5] [expr $doty + 5] \
  473.       -fill $dotcolour \
  474.       -outline ""
  475.     incr dotnum
  476.   }
  477.       
  478.   # Bind to the tag.
  479.   $logcanvas.canvas bind v$revnum <ButtonPress-1> \
  480.     "$logcanvas.tvers1 delete 0 end
  481.      $logcanvas.tvers1 insert end $revnum
  482.      $logcanvas.twho1 configure -text $revwho
  483.      $logcanvas.tdate1 configure -text $revdate
  484.      $logcanvas.tcomment1 delete 1.0 end
  485.      $logcanvas.tcomment1 insert end \"$revcomment\""
  486.   $logcanvas.canvas bind v$revnum <ButtonPress-3> \
  487.     "$logcanvas.tvers2 delete 0 end
  488.      $logcanvas.tvers2 insert end $revnum
  489.      $logcanvas.twho2 configure -text $revwho
  490.      $logcanvas.tdate2 configure -text $revdate
  491.      $logcanvas.tcomment2 delete 1.0 end
  492.      $logcanvas.tcomment2 insert end \"$revcomment\""
  493.   # Draw a connecting line.  Up if X.0, nowhere if X.1, down if > X.1
  494.   # This should work for most version starting points.
  495.   if {[lindex $versions [expr $numvers - 1]] == "0"} {
  496.     $logcanvas.canvas create line \
  497.       [expr $cvscanv(boxx) / 2 + $x] \
  498.       [expr $y - $cvscanv(gapy) + $cvscanv(boxy)] \
  499.       [expr $cvscanv(boxx) / 2 + $x] \
  500.       [expr $y]
  501.   } elseif {[lindex $versions [expr $numvers - 1]] != "1"} {
  502.     $logcanvas.canvas create line \
  503.       [expr $cvscanv(boxx) / 2 + $x] \
  504.       [expr $cvscanv(boxy) + $y] \
  505.       [expr $cvscanv(boxx) / 2 + $x] \
  506.       [expr $cvscanv(gapy) + $y]
  507.   }
  508. }
  509.  
  510. proc logcanvas_view {logcanvas} {
  511. #
  512. # Views the selected version.
  513. #
  514.   set ver1 [$logcanvas.tvers1 get]
  515.   set localfile [$logcanvas.tlocalfile get]
  516.  
  517.   if {$localfile != "no file"} {
  518.     cvs_view_r $ver1 $localfile
  519.   } else {
  520.     set fname [$logcanvas.tfname get]
  521.     rcs_fileview $fname $ver1
  522.   }
  523. }
  524.  
  525. proc logcanvas_diff {logcanvas} {
  526. #
  527. # Diffs two versions.
  528. #
  529.   set ver1 [$logcanvas.tvers1 get]
  530.   set ver2 [$logcanvas.tvers2 get]
  531.   set localfile [$logcanvas.tlocalfile get]
  532.  
  533.   if {$localfile != "no file"} {
  534.     cvs_diff_r $ver1 $ver2 $localfile
  535.   } else {
  536.     set fname [$logcanvas.tfname get]
  537.     rcs_filediff $fname $ver1 $ver2
  538.   }
  539. }
  540.  
  541. proc logcanvas_join {localfile logcanvas} {
  542. #
  543. # Joins a branch version to the head version.
  544. #
  545.   set ver1 [$logcanvas.tvers1 get]
  546.   set versions [split $ver1 "."]
  547.   set numvers [llength $versions]
  548.   if {$numvers < 4} {
  549.     cvserror "Please select a branch version for this function!"
  550.     return 1
  551.   }
  552.  
  553.   cvs_join $localfile $ver1
  554. }
  555.  
  556. proc logcanvas_delta {localfile logcanvas} {
  557. #
  558. # Merges changes in the delta between two versions to the head
  559. # version.
  560. #
  561.   set ver1 [$logcanvas.tvers1 get]
  562.   set ver2 [$logcanvas.tvers2 get]
  563.  
  564.   cvs_delta $localfile $ver1 $ver2
  565. }
  566.